home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Developer Helper 1: Phil & Dave's Excellent CD
/
Excellent CD HFS.raw
/
Utilities
/
ResEdit
/
Examples
/
PExamples
/
Source
/
RSSC.a
< prev
Wrap
Text File
|
2022-08-05
|
3KB
|
93 lines
;
; COPYRIGHT (C) 1984-1989 Apple Computer,Inc.
; All rights reserved
; This is the standard interface for a Resource Standard Code segment for use
; by the resource editor. The main resource editor will dispatch to this code
; when the user opens the respective type for editing. Dispatches will also
; occur with menu commands and events for this window. This code should be
; included in the resource editor file under type RSSC with any unique ID. It's
; resource name should consist of the type it's willing to edit or 'ALL' if it
; can edit all types of resources. {This comment is too old...}
; Each code segment MUST have a window and its kind MUST be the ID of the code and
; the refcon usually contains the handle to the instance of the object who's
; owned by the code. On activate/deactivate events, the code can put up and
; remove any menus if desired.
; The standard routines are:
; EditBirth( thing:Handle; parent: ParentHandle );
; PickBirth( t: ResType; parent: ParentHandle );
; DoMenu( menu, item: INTEGER; object: Handle );
; DoEvent( VAR evt: EvtRecord; object: Handle );
BLANKS ON
STRING ASIS
INCLUDE 'Traps.a'
StdRSSC MAIN
; Implemented in pascal for now...
IMPORT PickBirth
IMPORT EditBirth
IMPORT DoEvent
IMPORT DoMenu
IMPORT DoInfoUpdate
EXPORT ResEdID
StdHeader
DC.L ('RSSC')
DC.W JEditBirth-StdHeader
DC.W JPickBirth-StdHeader
DC.W JDoEvent-StdHeader
DC.W JDoMenu-StdHeader
DC.W JDoInfoUpdate-StdHeader
DC.W 0
DC.W 0
DC.W 0
DC.W 0
JEditBirth
; someday search for a window which satisfies this request
JMP EditBirth
JPickBirth
JMP PickBirth
JDoEvent
JMP DoEvent
JDoMenu
JMP DoMenu
JDoInfoUpdate
JMP DoInfoUpdate
; Gets Res ID of self and returns it
; FUNCTION ResEdID: INTEGER;
ResEdID
LINK A6,#-256
LEA StdHeader,A0
_RecoverHandle
MOVE.L A0,-(SP) ; pass handle
PEA 8(A6) ; function result
PEA -256(A6) ; ignore type
MOVE.L (SP),-(SP) ; ignore name
_GetResInfo
UNLK A6
RTS
END